﻿using BusinessLayer.Dal;
using System;
using System.Collections.Generic;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;
using System.Linq;
using System.Web;

namespace Biz
{
    public class ProductProperties
    {
        [Key, Required, DatabaseGenerated(DatabaseGeneratedOption.Identity)]
        public int Id { get; set; }
        [Required]
        public string Value { get; set; }
        public virtual Product Product { get; set; }
        public virtual Property Property { get; set; }

        public static string GetValue(Property pr, Product product)
        {
            return ProductPropertiesDal.GetValueOf(pr, product);
        }
    }
}